package com.qf.device.controller;

import com.qf.vo.R;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import com.qf.device.service.DeviceTypeService;
import com.qf.device.entity.DeviceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 设备类型表 前端控制器
 * </p>
 *
 * @author yxh
 * @since 2023-10-27
 */
@RestController
@CrossOrigin
@RequestMapping("/device-type")
public class DeviceTypeController {


    @Autowired
    private DeviceTypeService deviceTypeService;

//    @PreAuthorize("hasAuthority('设备列表')")
    @GetMapping(value = "/all")
    public R all() {
        return R.ok(deviceTypeService.list());
    }



}
